Namespace Ventas
Public Class ComprobanteDetalle
	Inherits Auditoria.Transaccion

	Private vComprobanteDetalleId As Integer = -1
	Private vComprobanteID As Integer = -1
	Private vComprobanteNombre As string =""
	Private vProductoId As Integer = -1
	Private vProductoNombre As string =""
	Private vCantidad As Integer = -1
	Private vStockBase As Integer = -1
	Private vStockDespues As Integer = -1
	Private vPrecioBase As Double = 0.0
	Private vPrecio As Double = 0.0
	Private vDescuentoID As Integer = -1
	Private vDescuentoNombre As string =""
	Private vDescuento As Double = 0.0
	Private vEstado As Integer = -1
	Private vSubTotal As Double = 0.0
	Private vTotal As Double = 0.0

	Public Property ComprobanteDetalleId() As Integer
		Get
			Return vComprobanteDetalleId
		End Get
		Set(ByVal Value As Integer)
			vComprobanteDetalleId = Value
		End Set
	End Property

	Public Property ComprobanteID() As Integer
		Get
			Return vComprobanteID
		End Get
		Set(ByVal Value As Integer)
			vComprobanteID = Value
		End Set
	End Property

	Public Property ComprobanteNombre() as string
		Get
			Return vComprobanteNombre
		End Get
		Set(ByVal Value As string)
			vComprobanteNombre = Value
		End Set
	End Property

	Public Property ProductoId() As Integer
		Get
			Return vProductoId
		End Get
		Set(ByVal Value As Integer)
			vProductoId = Value
		End Set
	End Property

	Public Property ProductoNombre() as string
		Get
			Return vProductoNombre
		End Get
		Set(ByVal Value As string)
			vProductoNombre = Value
		End Set
	End Property

	Public Property Cantidad() As Integer
		Get
			Return vCantidad
		End Get
		Set(ByVal Value As Integer)
			vCantidad = Value
		End Set
	End Property

	Public Property StockBase() As Integer
		Get
			Return vStockBase
		End Get
		Set(ByVal Value As Integer)
			vStockBase = Value
		End Set
	End Property

	Public Property StockDespues() As Integer
		Get
			Return vStockDespues
		End Get
		Set(ByVal Value As Integer)
			vStockDespues = Value
		End Set
	End Property

	Public Property PrecioBase() As Double
		Get
			Return vPrecioBase
		End Get
		Set(ByVal Value As Double)
			vPrecioBase = Value
		End Set
	End Property

	Public Property Precio() As Double
		Get
			Return vPrecio
		End Get
		Set(ByVal Value As Double)
			vPrecio = Value
		End Set
	End Property

	Public Property DescuentoID() As Integer
		Get
			Return vDescuentoID
		End Get
		Set(ByVal Value As Integer)
			vDescuentoID = Value
		End Set
	End Property

	Public Property DescuentoNombre() as string
		Get
			Return vDescuentoNombre
		End Get
		Set(ByVal Value As string)
			vDescuentoNombre = Value
		End Set
	End Property

	Public Property Descuento() As Double
		Get
			Return vDescuento
		End Get
		Set(ByVal Value As Double)
			vDescuento = Value
		End Set
	End Property

	Public Property Estado() As Integer
		Get
			Return vEstado
		End Get
		Set(ByVal Value As Integer)
			vEstado = Value
		End Set
	End Property

	Public Property SubTotal() As Double
		Get
			Return vSubTotal
		End Get
		Set(ByVal Value As Double)
			vSubTotal = Value
		End Set
	End Property

	Public Property Total() As Double
		Get
			Return vTotal
		End Get
		Set(ByVal Value As Double)
			vTotal = Value
		End Set
	End Property

	Sub New()
	End Sub

	Sub New(ByRef ComprobanteDetalleId As Integer, ByVal ComprobanteID As Integer, ByVal ProductoId As Integer, ByVal Cantidad As Integer, ByVal StockBase As Integer, ByVal StockDespues As Integer, ByVal PrecioBase As Double, ByVal Precio As Double, ByVal DescuentoID As Integer, ByVal Descuento As Double, ByVal Estado As Integer, ByVal SubTotal As Double, ByVal Total As Double)
		vComprobanteDetalleId = ComprobanteDetalleId
		vComprobanteID = ComprobanteID
		vProductoId = ProductoId
		vCantidad = Cantidad
		vStockBase = StockBase
		vStockDespues = StockDespues
		vPrecioBase = PrecioBase
		vPrecio = Precio
		vDescuentoID = DescuentoID
		vDescuento = Descuento
		vEstado = Estado
		vSubTotal = SubTotal
		vTotal = Total
	End Sub

End Class



 Public Class ComprobanteDetalleCol   
 Inherits System.Collections.CollectionBase
Private _enmSortDirection As SortDirection
Public Sub New()
_enmSortDirection = SortDirection.Asc
End Sub
Public Sub Sort(ByVal sortExpression As String, ByVal sortDirection As SortDirection)
InnerList.Sort(New Comparer(sortExpression, SortDirection))
End Sub
Public Sub Sort(ByVal sortExpression As String)
InnerList.Sort(New Comparer(sortExpression, _enmSortDirection))
If _enmSortDirection = SortDirection.Asc Then
_enmSortDirection = SortDirection.Desc
Else
_enmSortDirection = SortDirection.Asc
End If
End Sub
Public Function Add(ByVal obj As ComprobanteDetalle) As Integer
Return MyBase.List.Add(obj)
End Function
Public Sub AddPrimero(ByVal obj As ComprobanteDetalle)
MyBase.List.Insert(0, obj)
End Sub
Public ReadOnly Property ComprobanteDetalle(ByVal Index As Integer) As ComprobanteDetalle
Get
Return CType(MyBase.List(Index), ComprobanteDetalle)
End Get
End Property
End Class
end namespace

